<?php htmlTemplate('admin_header_frame.php');?>
<div class="title">邂逅统计

</div>


<table width="100%" cellspacing="1" cellpadding="3" id="listTable">
  <tbody>
    	<tr>
		<td colspan="7">
		<form action="">			
		日期：<input 
			id="c_sdatetime" 
			name="c_sdatetime" 
			type="text" 
			style="width:65px;"
			value='<?php 
			if (Http::get('c_sdatetime')){
				echo Http::get('c_sdatetime');
			}
			?>' class='date demo_time'  
			onClick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})"
			>-<input 
			id="c_edatetime" 
			name="c_edatetime" 
			type="text" 
			style="width:65px;"
			value='<?php 				 
			if (Http::get('c_edatetime')){
				echo Http::get('c_edatetime');
			}
			?>' class='date demo_time'  
			onClick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})"
			>
		<input type="submit" value="搜 索" class="btn"> 
		
		</form>
		</td>
	</tr>
  
  <tr>
  	<th align="left" width="10%">日期</th>  
  	<th>总邂逅次数</th> 
    <th>总邂逅人数</th>
    <th>平均每人邂逅次数</th>
   
       
  </tr>

	<?php 
	$count_user =0;
	$count_e_user = 0;	
	
	if ($rs){
	foreach ($rs as $k=>$v):
	$count_user = $count_user+ $v['count_user'];
	$count_e_user = $count_e_user+ $v['count_e_user'];


	?>
   <tr>
    <td align="left" width="10%"> <?php echo $v['dateline'];?></td>
    <td align="center">
	<?php echo $v['count_user'];?> 
	</td>
	<td align="center">
	<?php echo $v['count_e_user'];?> 
	</td>
	<td align="center">
	<?php echo @round($v['count_user']/$v['count_e_user'],4);?> 
	</td>
	
	   
  </tr>
  <?php endforeach;}?>
  <tr style="background: #F4FAFB;">
  <td align="left">合计</td>
	<td align="center"><? echo $count_user;?> </td>
	<td align="center"><? echo $count_e_user;?></td>
	
	<td align="center"><? echo @round($count_user/$count_e_user,4);?> </td>	
</tr>
 
 
  </tbody>
</table>
<?php htmlTemplate('admin_footer_frame.php');?>